import java.util.LinkedList ;

public abstract class ParameterFramework implements IParameters {
	protected String [ ] parameterNames = null ;
	
	public LinkedList<ParameterData> getParams ( ) {
		LinkedList<ParameterData> result = new LinkedList<ParameterData> ( ) ;
		String data ;
		
		if ( parameterNames == null ) {
			return result ;
		}
		
		for ( String name : parameterNames ) {
			data = getParam ( name ) ;
			if ( data != null ) {
				result.add ( new ParameterData ( name , data ) ) ;
			}
		}
		
		return result ;
	}
	
	public void setParam ( ParameterData p ) {
		setParam ( p.name , p.data ) ;
	}
	
	public void setParam ( LinkedList<ParameterData> params ) {
		for ( ParameterData p : params ) {
			setParam ( p.name , p.data ) ;
		}
	}
}
